#include <stdio.h>

int ShuiXianHua(int unitNum, int tensNum, int hundred) {
    int result = unitNum * unitNum * unitNum + tensNum * tensNum * tensNum + hundred * hundred * hundred;
    return result;
}

int main() {

    int num = 100;

    while (num < 1000) {
        int unitNum = num % 10;
        int tensNum = num / 10 % 10;
        int hundred = num / 100;
        int result = ShuiXianHua(unitNum, tensNum, hundred);
        if (result == num) {
            printf("%d\n", num);
            num++;
        } else {
            num++;
        }
    }
    return 0;
}